/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;

import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JTabbedPane;

public class FramePrincipal extends JFrame {

    public FramePrincipal() {
        setSize(700, 600);
        setTitle("Trabajo final  :D");


        final PanelView panel = new PanelView();
        final Codigo pn1 = new Codigo();
        final frmUsuario pn2 = new frmUsuario();
        JButton temp = pn1.getjButton1();
        temp.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                panel.set(pn2);
            }
        });
        panel.set(pn1);


        JTabbedPane pestana = new JTabbedPane();
        pestana.add("Informacion General",new Actualiza_Alumno());
        //pestana.add("Informacion General",new Loggear());
        //pestana.add("Alumno",Loggear());
        add(pestana);
        pestana.setSelectedIndex(0);


    }





    public static void main(String[] args) {
        EventQueue.invokeLater(new Runnable() {

            public void run() {
                JFrame frame = new FramePrincipal();
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                frame.setVisible(true);
            }
        });
    }
}
